/**
 * 通用样式
 */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: -10px;
}

.col {
    flex: 1;
    padding: 10px;
    min-width: 300px;
}

.card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
}

.card-header {
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    color: #333;
}

/**
 * 表单元素
 */
.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

input[type="text"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

button, .btn {
    padding: 10px 20px;
    background: #4a6fdc;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

button:hover, .btn:hover {
    background: #3a5dc0;
}

button:disabled, .btn:disabled {
    background: #aab6d3;
    cursor: not-allowed;
}

.btn-secondary {
    background: #6c757d;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-small {
    padding: 5px 10px;
    font-size: 12px;
}

/**
 * 消息列表
 */
.message-list {
    height: 400px;
    overflow-y: auto;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #f9f9f9;
}

.message-item {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.message-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.message-sender {
    font-weight: 600;
}

.message-time {
    font-size: 12px;
    color: #777;
}

.message-content {
    white-space: pre-wrap;
    word-break: break-word;
}

.message-content img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 4px;
    display: block;
    margin-top: 5px;
}

.message-content audio {
    width: 100%;
    margin-top: 5px;
}

.message-content video {
    max-width: 100%;
    max-height: 300px;
    margin-top: 5px;
}

.message-outgoing {
    text-align: right;
    background-color: #e6f2ff;
    padding: 8px 12px;
    border-radius: 10px 10px 0 10px;
    margin-left: auto;
    max-width: 70%;
}

.message-incoming {
    background-color: #f2f2f2;
    padding: 8px 12px;
    border-radius: 10px 10px 10px 0;
    margin-right: auto;
    max-width: 70%;
}

/**
 * 上传预览
 */
.media-preview {
    margin: 10px 0;
}

.media-preview img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 4px;
}

.media-preview audio {
    width: 100%;
}

.media-preview video {
    max-width: 100%;
    max-height: 300px;
}

/**
 * 用户状态
 */
.user-status {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 5px;
}

.status-online {
    background-color: #28a745;
}

.status-offline {
    background-color: #dc3545;
}

/**
 * 好友列表
 */
.friend-list {
    list-style: none;
    padding: 0;
}

.friend-item {
    padding: 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.friend-item:hover {
    background: #f0f0f0;
}

.friend-item.active {
    background: #e6f2ff;
}

/**
 * 通知/提示
 */
.notification {
    padding: 10px 15px;
    margin-bottom: 15px;
    border-radius: 4px;
}

.notification-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.notification-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.notification-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.notification-info {
    background-color: #cce5ff;
    color: #004085;
    border: 1px solid #b8daff;
}

/**
 * 标签页
 */
.tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.tab {
    padding: 10px 20px;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-right: 10px;
}

.tab.active {
    border-bottom: 3px solid #4a6fdc;
    color: #4a6fdc;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/**
 * 进度条
 */
.progress-bar {
    width: 100%;
    height: 10px;
    background-color: #f0f0f0;
    border-radius: 5px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background-color: #4a6fdc;
    width: 0;
    transition: width 0.3s;
}

/**
 * 响应式设计
 */
@media (max-width: 768px) {
    .row {
        display: block;
    }
    
    .col {
        width: 100%;
    }
    
    .message-outgoing,
    .message-incoming {
        max-width: 90%;
    }
}

/* 额外添加一些工具类 */
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.d-flex { display: flex; }
.justify-content-between { justify-content: space-between; }
.align-items-center { align-items: center; }
.w-100 { width: 100%; }
.text-muted { color: #6c757d; }
.text-danger { color: #dc3545; }
.text-success { color: #28a745; }
.hidden { display: none !important; }

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.animate-fade-in {
    animation: fadeIn 0.3s ease;
}

@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0.2; }
    100% { opacity: 1; }
}

.animate-blink {
    animation: blink 1s infinite;
} 